import { Component, OnInit } from '@angular/core';
import {Tasks} from "../../shared/PendingTask";
import {BackApiService} from "../back-api.service";
import {Router} from "@angular/router";
import {ActivatedRoute} from "@angular/router";
import {PageTitleService} from "../page-title.service";

@Component({
  selector: 'app-mails',
  templateUrl: './mails.component.html',
  styleUrls: ['./mails.component.scss']
})
export class MailsComponent extends Tasks implements OnInit {
  title(): string {
    return "邮件";
  }


  mails: Mail[] = MAILS;

  constructor(
    protected _taskService: BackApiService,
    protected _router: Router,
    protected _routerActive: ActivatedRoute,
    protected _pageTitle: PageTitleService,
  ) {
    super(_router , _pageTitle,_routerActive,_taskService);
  }

  ngOnInit() {
  }

}

const MAILS: Mail[] = [
  { title: "邮件主题", from: "习近平", content: "十九大人事我们的应对方式"},
  { title: "十九大召开", from: "王岐山", content: "习近平今天和谁谁谁怎么样.."},
  { title: "反腐不能搞要闻", from: "惊天贪腐数字", content: "150万亿贪腐"}
];

interface Mail {
  title: string;
  from: string
  content: string;
}
